Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <head> <style> p:nth-last-child(2) { background: #ff0000; } </style> </head> <body> <p>The first paragraph.</p> <p>The second paragraph.</p> <p>The third paragraph.</p> <p>The fourth paragraph.</p> <p><b>Note:</b> Internet Explorer 8 and earlier versions do not support the :nth-last-child() selector.</p> </body> <!-- Mirrored from www.w3schools.com/cssref/tryit.asp?filename=trycss3_nth-last-child by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 08:14:02 GMT --> </html>
Result:
Try it Yourself - © w3schools.com